package vista;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaProveedor extends javax.swing.JFrame {
	private JPanel panProvee;
	private JTable tblProvee;
	private JScrollPane srllDir;
	private JButton btnE;
	private JButton btnMo;
	private JButton btnRe;
	private JTextField txtDi;
	private JButton btnSalir;
	private JLabel lblDir;
	private JTextField txtNombre;
	private JButton btnGuardar;
	private JTextField txtCorreo;
	private JTextField txtCel;
	private JTextField txtTlf;
	private JLabel lblCorreo;
	private JLabel lblCel;
	private JLabel lblTlf;
	private JLabel lblNombre;
	private JLabel lblTitulo;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VentanaProveedor inst = new VentanaProveedor();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VentanaProveedor() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(255,192,203));
			{
				panProvee = new JPanel();
				getContentPane().add(panProvee, BorderLayout.CENTER);
				panProvee.setLayout(null);
				panProvee.setBackground(new java.awt.Color(255,223,228));
				panProvee.setBackground(new java.awt.Color(255,222,228));
				{
					lblTitulo = new JLabel();
					panProvee.add(lblTitulo);
					lblTitulo.setText("PROVEEDORES");
					lblTitulo.setBounds(299, 12, 171, 25);
					lblTitulo.setFont(new java.awt.Font("Arial",0,20));
				}
				{
					lblNombre = new JLabel();
					panProvee.add(lblNombre);
					lblNombre.setText("Nombre:");
					lblNombre.setBounds(458, 78, 65, 15);
				}
				{
					lblDir = new JLabel();
					panProvee.add(lblDir);
					lblDir.setText("Dirección:");
					lblDir.setBounds(458, 114, 73, 15);
				}
				{
					lblTlf = new JLabel();
					panProvee.add(lblTlf);
					lblTlf.setText("Teléfono:");
					lblTlf.setBounds(458, 165, 73, 15);
				}
				{
					lblCel = new JLabel();
					panProvee.add(lblCel);
					lblCel.setText("Celular:");
					lblCel.setBounds(458, 197, 57, 15);
				}
				{
					lblCorreo = new JLabel();
					panProvee.add(lblCorreo);
					lblCorreo.setText("E-Mail:");
					lblCorreo.setBounds(459, 232, 48, 15);
				}
				{
					txtNombre = new JTextField();
					panProvee.add(txtNombre);
					txtNombre.setBounds(530, 75, 209, 22);
				}
				{
					txtTlf = new JTextField();
					panProvee.add(txtTlf);
					txtTlf.setBounds(627, 161, 112, 22);
				}
				{
					txtCel = new JTextField();
					panProvee.add(txtCel);
					txtCel.setBounds(627, 195, 112, 22);
				}
				{
					txtCorreo = new JTextField();
					panProvee.add(txtCorreo);
					txtCorreo.setBounds(525, 229, 214, 22);
				}
				{
					btnGuardar = new JButton();
					panProvee.add(btnGuardar);
					btnGuardar.setText("Guardar");
					btnGuardar.setBounds(523, 283, 99, 22);
				}
				{
					btnSalir = new JButton();
					panProvee.add(btnSalir);
					btnSalir.setText("Salir");
					btnSalir.setBounds(639, 283, 99, 22);
				}
				{
					DefaultTableModel tblProveeModel = 
							new DefaultTableModel(
									new String[][] {},
									new String[] { "Codigo", "Nombre", "Telefono" });
					tblProvee = new JTable();
					panProvee.add(tblProvee);
					tblProvee.setModel(tblProveeModel);
					tblProvee.setBounds(21, 78, 414, 166);
				}
				{
					srllDir = new JScrollPane();
					panProvee.add(srllDir);
					srllDir.setBounds(531, 109, 208, 40);
					{
						txtDi = new JTextField();
						srllDir.setViewportView(txtDi);
						txtDi.setBounds(363, 263, 190, 22);
					}
				}
				{
					btnRe = new JButton();
					panProvee.add(btnRe);
					btnRe.setText("Registrar");
					btnRe.setBounds(28, 283, 117, 22);
				}
				{
					btnMo = new JButton();
					panProvee.add(btnMo);
					btnMo.setText("Modificar");
					btnMo.setBounds(174, 283, 120, 22);
				}
				{
					btnE = new JButton();
					panProvee.add(btnE);
					btnE.setText("Eliminar");
					btnE.setBounds(325, 283, 110, 22);
				}
			}
			pack();
			this.setSize(755, 345);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
